package com.hpjpw.idoapp.domain;

import com.ruoyi.common.annotation.Excel;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import javax.validation.constraints.Email;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Size;

/**
 * @BelongsProject: ruoyi
 * @BelongsPackage: com.hpjpw.idoapp.domain
 * @Author: hpj
 * @CreateTime: 2021-01-04 20:30
 * @Description: 导入学生的类
 */
public class StudentImportVo {
    private static final long serialVersionUID = 1L;
    /**
     * 学号
     */
    @Excel(name = "学号")
    private String number;

    /**
     * 姓名（用户昵称）
     */
    @Excel(name = "姓名")
    private String nickName;

    /**
     * 用户邮箱
     */
    @Excel(name = "用户邮箱")
    private String email;

    /**
     * 手机号码
     */
    @Excel(name = "手机号码")
    private String phoneNumber;

    /**
     * 用户性别
     */
    @Excel(name = "用户性别", readConverterExp = "0=男,1=女,2=未知")
    private String sex;

    /**
     * 地区码
     */
    @Excel(name = "地区码")
    private Long areaId;
    /**
     * 学校
     */
    @Excel(name = "学校")
    private String school;
    /**
     * 专业
     */
    @Excel(name = "专业")
    private String major;
    /**
     * 年级
     */
    @Excel(name = "年级")
    private String grade;

    public String getSchool() {
        return school;
    }

    public void setSchool(String school) {
        this.school = school;
    }

    public String getMajor() {
        return major;
    }

    public void setMajor(String major) {
        this.major = major;
    }

    public String getGrade() {
        return grade;
    }

    public void setGrade(String grade) {
        this.grade = grade;
    }

    @NotBlank(message = "名字不能为空")
    @Size(min = 0, max = 30, message = "名字长度不能超过30个字符")
    public String getNickName() {
        return nickName;
    }

    public void setNickName(String nickName) {
        this.nickName = nickName;
    }

    @NotBlank(message = "邮箱不能为空")
    @Email(message = "邮箱格式不正确")
    @Size(min = 0, max = 50, message = "邮箱长度不能超过50个字符")
    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    @NotBlank(message = "手机号码不能为空")
    @Size(min = 0, max = 11, message = "手机号码长度不能超过11个字符")
    public String getPhoneNumber() {
        return phoneNumber;
    }

    public void setPhoneNumber(String phoneNumber) {
        this.phoneNumber = phoneNumber;
    }

    public Long getAreaId() {
        return areaId;
    }

    public void setAreaId(Long areaId) {
        this.areaId = areaId;
    }

    @NotBlank(message = "职工号不能为空")
    public String getNumber() {
        return number;
    }

    public void setNumber(String number) {
        this.number = number;
    }

    @NotBlank(message = "性别不能为空")
    public String getSex() {
        return sex;
    }

    public void setSex(String sex) {
        this.sex = sex;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("职工号", getNumber())
                .append("姓名", getNickName())
                .append("邮箱", getEmail())
                .append("手机号", getPhoneNumber())
                .append("性别", getSex())
                .append("地区码", getAreaId())
                .append("学校", getSchool())
                .append("专业", getMajor())
                .append("年级", getGrade())
                .toString();
    }
}
